package com.kinyx.framework.bean;

import org.junit.Assert;
import org.junit.Test;

public class DKHashMap_Tester_ {

	private void method(final String key1, final String key2) {
		Assert.assertTrue(new DKHashMap<String, String, String>().get(key1, key2) == null);

		Assert.assertTrue(new DKHashMap<String, String, String>().put(key1, key2, "foo").get(key1, key2).equals("foo"));
		Assert.assertTrue(new DKHashMap<String, String, String>().put(key1, key2, "foo").clear().get(key1, key2) == null);
		Assert.assertTrue(new DKHashMap<String, String, String>().put(key1, key2, "foo").clear().put(key1, key2, "bar").get(key1, key2).equals("bar"));

		Assert.assertTrue(new DKHashMap<String, String, String>().put(key1, key2, "foo").put(key1, key2, "bar").get(key1, key2).equals("bar"));
		Assert.assertTrue(new DKHashMap<String, String, String>().put(key1, key2, "foo").put(key1, key2, null).get(key1, key2) == null);
	}

	@Test
	public void test() {
		this.method(null, null);
		this.method("key1", null);
		this.method(null, "key2");
		this.method("key1", "key2");
	}

}
